<?

  require("api/base_support.php");

    $up = new upload('doc|docx');
    $up->set_dir($webRoot.'uploadfiles/words/','{y}/{m}/{d}');
    $fs=$up->execute();
    $user_id=get_sess_userid();//用户ID
    $realtxt=$fs[0];
    
    if($realtxt['flag']==1){
           dbtarget('w',$dbServs);
           $fileSrcStr=str_replace($webRoot,"",$realtxt['dir']).$realtxt['name'];
           $dbo=new dbex();
           $sql="update isns_users set iweber_isword=1,iweber_word='$fileSrcStr' where user_id=".$user_id;
           $dbo->exeUpdate($sql);
      	   action_return(0,"上传成功",'-1');
    
    }else if($realtxt['flag']==-1){
      	  action_return(0,"上传格式不对",'-1');
    }else if($realtxt['flag']==-2){
          action_return(0,"不能超过1m大小",'-1');
      }



// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
?>
